import http from './method.js'

// 课程列表(搜索)
export const md5 = (query = '') => {
  return http().get('/oauth/token/md5' + query)
}

export const getAccessToken = (query = '') => {
  return http().get('/oauth/token/accesstoken' + query)
}

// 课程详情
export const refreshAccessToken = (query = '') => {
  return http().get('/oauth/token/refreshtoken' + query)
}

// 课程详情(登录后)
export const uploadScore = (access_token, body) => {
  // body = JSON.stringify(body)
  return http().post('/oauth/api/v1/data_upload?access_token=' + access_token, body, {
    headers: {
      'Content-Type': 'application/json'
    }
  })
}
